package org.zs.rocketmqstarter;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author madison
 * @description
 * @date 2021/7/4 13:36
 */
@Component
@RocketMQMessageListener(consumerGroup = "rocketmq-boot-consumer-group-example",
        topic = "RocketmqBootTopicTest",
        selectorType = SelectorType.TAG,
        selectorExpression = "*")
public class MyRocketMQListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.printf("收到一个消息:%s%n", message);
    }
}
